package com.bytecamp.testplatform;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 智能自动化测试平台主启动类（Spring Boot 3.x + JDK 17）
 */
@SpringBootApplication
@MapperScan("com.bytecamp.testplatform.mapper")  // 扫描 MyBatis Mapper
@OpenAPIDefinition(  // 替代原 @EnableOpenApi，定义接口文档基本信息
        info = @Info(
                title = "智能自动化测试平台 API",
                version = "1.0",
                description = "字节跳动工程训练营测试开发方向项目接口文档"
        )
)
public class TestplatformApplication {
    public static void main(String[] args) {
        SpringApplication.run(TestplatformApplication.class, args);
        // 3.x 版本接口文档地址调整（springdoc 默认路径）
        System.out.println("测试平台启动成功！接口文档地址：http://localhost:8080/swagger-ui/index.html");
    }
}